// 自动生成模板Food
package catering

import (
	"gitcode.com/G-YT/iHealth25/server/global"
	"gitcode.com/G-YT/iHealth25/server/model/hierarchy"
	"time"
)

type RootReq struct {
	RootID uint `json:"root_id" form:"root_id" gorm:"column:root_id;comment:根id;"`
}

// 配餐 结构体  Food
type Food struct {
	global.GVA_MODEL
	UserID    uint       `json:"userID" form:"userID" gorm:"column:user_id;comment:用户id;"`       //用户id
	Breakfast *int       `json:"breakfast" form:"breakfast" gorm:"column:breakfast;comment:早餐;"` //早餐
	Lunch     *int       `json:"lunch" form:"lunch" gorm:"column:lunch;comment:午餐;"`             //午餐
	Dinner    *int       `json:"dinner" form:"dinner" gorm:"column:dinner;comment:晚餐;"`          //晚餐
	Date      *time.Time `json:"date" form:"date" gorm:"column:date;comment:日期;"`                //日期
	Tea       *int       `json:"tea" form:"tea" gorm:"column:tea;comment:体质茶;"`                  //体质茶
	Brain     *int       `json:"brain" form:"brain" gorm:"column:brain;comment:大脑;"`             //大脑
	Sport     *int       `json:"sport" form:"sport" gorm:"column:sport;comment:运动;"`             //运动
	Tips      string     `json:"tips" form:"tips" gorm:"column:tips;comment:健管师方案提醒;type:text;"` //健管师方案提醒
}

type Plan struct {
	global.GVA_MODEL
	UserID uint       `json:"userID" form:"userID" gorm:"column:user_id;comment:用户id;"` //用户id
	Date   *time.Time `json:"date" form:"date" gorm:"column:date;comment:日期;"`          //日期

}

type FoodRes struct {
	global.GVA_MODEL
	UserID            uint                         `json:"userID" form:"userID" gorm:"column:user_id;comment:用户id;"`                                     //用户id
	Breakfast         []hierarchy.FdArticleGraphic `json:"breakfast" form:"breakfast" gorm:"column:breakfast;comment:早餐;"`                               //早餐
	IsSelectBreakfast bool                         `json:"isSelectBreakfast" form:"isSelectBreakfast" gorm:"column:is_select_breakfast;comment:是否选择早餐;"` //是否选择早餐
	Lunch             []hierarchy.FdArticleGraphic `json:"lunch" form:"lunch" gorm:"column:lunch;comment:午餐;"`                                           //午餐
	IsSelectLunch     bool                         `json:"isSelectLunch" form:"isSelectLunch" gorm:"column:is_select_lunch;comment:是否选择午餐;"`             //是否选择午餐
	Dinner            []hierarchy.FdArticleGraphic `json:"dinner" form:"dinner" gorm:"column:dinner;comment:晚餐;"`                                        //晚餐
	IsSelectDinner    bool                         `json:"isSelectDinner" form:"isSelectDinner" gorm:"column:is_select_dinner;comment:是否选择晚餐;"`          //是否选择晚餐
	Date              *time.Time                   `json:"date" form:"date" gorm:"column:date;comment:日期;"`                                              //日期
	Tea               []hierarchy.FdArticleGraphic `json:"tea" form:"tea" gorm:"column:tea;comment:体质茶;"`                                                //体质茶
}

// TableName 配餐 Food自定义表名 fd_food
func (Food) TableName() string {
	return "fd_food"
}
